import request from '@/utils/request'

// 查询库存盘点单产品列表
export function listPandianproduct(query) {
  return request({
    url: '/mes/wm/pandianproduct/list',
    method: 'get',
    params: query
  })
}

// 查询库存盘点单产品详细
export function getPandianproduct(id) {
  return request({
    url: '/mes/wm/pandianproduct/' + id,
    method: 'get'
  })
}

// 查询库存盘点单产品详细根据盘点单id
export function getProductByPId(pandianId) {
  return request({
    url: '/mes/wm/pandianproduct/getProductByPId/' + pandianId,
    method: 'get'
  })
}

// 新增库存盘点单产品
export function addPandianproduct(data) {
  return request({
    url: '/mes/wm/pandianproduct',
    method: 'post',
    data: data
  })
}

// 修改库存盘点单产品
export function updatePandianproduct(data) {
  return request({
    url: '/mes/wm/pandianproduct',
    method: 'put',
    data: data
  })
}

// 删除库存盘点单产品
export function delPandianproduct(id) {
  return request({
    url: '/mes/wm/pandianproduct/' + id,
    method: 'delete'
  })
}

// 删除盘点单物料 单行物料
export function deleteProByPidItemId(pandianId,itemId) {
  return request({
    url: '/mes/wm/pandianproduct/deleteProByPidItemId/' + pandianId +'/'+ itemId,
    method: 'get'
  })
}
